-
Notifications
You must be signed in to change notification settings - Fork 84
Update to support golangci-lint v2 #366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -41,17 +41,17 @@ type stdoutlogger struct { | |||
} | |||
|
|||
func (l stdoutlogger) WithName(name string) logr.LogSink { | |||
l.Formatter.AddName(name) | |||
l.AddName(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something that we might want to enable as hint in Kubernetes? Or is it too subjective?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's CORRECT but not obviously BETTER, IMO. I decided not to fight it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
@@ -32,42 +32,42 @@ import ( | |||
// | |||
|
|||
func BenchmarkSlogSinkLogInfoOneArg(b *testing.B) { | |||
var log logr.Logger = logr.FromSlogHandler(logr.ToSlogHandler(logr.Discard())) | |||
var log logr.Logger = logr.FromSlogHandler(logr.ToSlogHandler(logr.Discard())) //nolint:staticcheck |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to keep the var log logr.Logger =
instead of replacing with log :=
?
I don't remember why I wrote it like this other than more clearly showing the type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the clarity in the benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably that was why I did it - if only I remembered... 😅
No description provided.